package com.twu.biblioteca.System;

import com.twu.biblioteca.Models.Book;
import com.twu.biblioteca.Models.Item;

/**
 * Created by ubuntu on 4/28/14.
 */
public class SystemMessages {
    private String welcomeMessage = "welcome User";
    private String invalidMenuOptionMessage = "Select a valid option!";
    private String successfulBookCheckOutMessage = "Thank you! Enjoy the book";
    private String unSuccessfulBookCheckOutMessage = "That Book is not available";
    private String successfulBookReturnMessage = "Thank you for returning the book";
    private String unSuccessfulBookReturnMessage = "That book is not available";

    private String successfulMovieCheckOutMessage = "Thank you! Enjoy the Movie";
    private String unSuccessfulMovieCheckOutMessage = "That Movie is not available";
    private String successfulMovieReturnMessage = "Thank you for returning the Movie";
    private String unSuccessfulMovieReturnMessage = "That is not a valid Movie to return";

    public <T extends Item> String getUnSuccessfullReturnMessage(Class<T> classType) {
        return unSuccessfulBookReturnMessage;
    }

    public <T extends Item> String getUnSuccessfulBookCheckOutMessage(Class<T> classType) {
        if (classType.equals(Book.class))
            return unSuccessfulBookCheckOutMessage;
        return successfulMovieCheckOutMessage;
    }

    public String getInvalidMenuOptionMessage() {
        return invalidMenuOptionMessage;
    }

    public String getWelcomeMessage() {
        return welcomeMessage;
    }

    public <T extends Item> String getSuccessfulBookCheckOutMessage(Class<T> classType) {
        if (classType.equals(Book.class))
            return successfulBookCheckOutMessage;
        return successfulMovieCheckOutMessage;
    }

    public <T extends Item> String getSuccessfulBookReturnMessage(Class<T> classType) {
        if (classType.equals(Book.class))
            return successfulBookReturnMessage;
        return successfulMovieCheckOutMessage;
    }
}
